<?php

/*
|--------------------------------------------------------------------------
| Load Configuration File and BasicPHP Class Library
|--------------------------------------------------------------------------
*/

require_once 'config.php';
require_once 'Basic.php';

/*
|--------------------------------------------------------------------------
| Security
|--------------------------------------------------------------------------
*/

// Basic::firewall(); // Firewall
// Basic::force_ssl(); // SSL/HTTPS

/*
|--------------------------------------------------------------------------
| Routing
|--------------------------------------------------------------------------
*/

// Basic::route_auto(); // Automatic '/class/method' routing
// Basic::homepage(); // Render homepage

/*
|--------------------------------------------------------------------------
| Endpoint Routing
|--------------------------------------------------------------------------
*/

Basic::route('GET', '/', function() {
    echo '';
});
Basic::route('GET', '/user/(:num)', function() {
    echo Basic::segment(2);
});
Basic::route('POST', '/user', function() {
    echo '';
});

/*
|--------------------------------------------------------------------------
| Handle Error 404 - Page Not Found - Invalid URI
|--------------------------------------------------------------------------
*/

Basic::error404(); // Handle Error 404